from uitls import jobRemoteUtil


# 执行器模块cs架构： client 负责拼接request请求
#

class ExecuorClient:

    def __init__(self):
        self.address = None
        self.accessToken = None
        self.timeout = None

    def beat(self):
        return jobRemoteUtil.postBody(self.address + "beat")

    def idleBeat(self, idleBeatParam):
        return jobRemoteUtil.postBody(self.address + "idle")

    def run(self, triggerParam):
        return jobRemoteUtil.postBody(self.address + "trigger")

    def kill(self, killParam):
        return jobRemoteUtil.postBody(self.address + "kill")

    def log(self, logParam):
        return jobRemoteUtil.postBody(self.address + "log")
